package com.demo.core.service.base.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.demo.core.dao.SiteGroupDao;
import com.demo.core.model.SiteGroup;
import com.demo.core.service.base.SiteGroupService;

/**
 * 站点组服务默认实现类
 * @author ryuu.kk
 *
 */
public class SiteGroupServiceImpl implements SiteGroupService {

	private SiteGroupDao siteGroupDao;
	@Override
	public boolean exists(Long id) {
		return siteGroupDao.exists(id);
	}

	@Override
	public void delete(Long id) {
		siteGroupDao.delete(id);
	}

	@Override
	public Long save(SiteGroup siteGroup) {
		return siteGroupDao.insert(siteGroup);
	}

	@Override
	public SiteGroup find(Long id) {
		return siteGroupDao.select(id);
	}

	@Override
	public List<SiteGroup> findAll() {
		Map<String, Object> params = new HashMap<String, Object>(1);
		return siteGroupDao.select(params);
	}

	public void setSiteGroupDao(SiteGroupDao siteGroupDao) {
		this.siteGroupDao = siteGroupDao;
	}
}
